package com.jiazhong.boot.example.emp.controller;

import com.jiazhong.boot.commons.util.JsonResult;
import com.jiazhong.boot.example.emp.service.DeptService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/dept")
public class DeptController {
    @Resource
    private DeptService service;
    ;

    @GetMapping
    public JsonResult findAll() {
        return service.findAll();
    }
}
